const Mock = require('mockjs');
const result = Mock.mock({
    "data|500-700": [{
        name: '@cname',
        birthday: "@date",
        "sex|1-2": true,
        mobile: /1\d{10}/,
        "age|0-100": 0,
        "ClassId|1-16": 0
    }]
})
const Student = require('../models/Student');
console.log('result', result.data);

// 执行批量插入操作并处理 Promise
Student.bulkCreate(result.data)
    .then(() => {
        console.log('数据插入成功');
    })
    .catch((error) => {
        console.error('数据插入失败:', error);
    });
